﻿using System.Windows;
using System.Windows.Controls;
using EzDesk.DesktopClient.UtilityView.ViewModel;

namespace EzDesk.DesktopClient.View
{
    public class TodoComboBoxContainerStyleSelector : StyleSelector
    {
        public override Style SelectStyle(object item, DependencyObject container)
        {
            var viewModel = item as IFeedItemViewModel;
            var element = container as FrameworkElement;

            if (viewModel.IsRead)
                return element.FindResource("completedContainerStyle") as Style;

            return element.FindResource("todoContainerStyle") as Style;
        }
    }
}